Skip to content

fix: resolve all failing tests across monorepo packages#15

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2413-1779815762
Open

fix: resolve all failing tests across monorepo packages#15
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2413-1779815762

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 26, 2026

Summary

  • Renamed hook: Re-exported useDebounce as useSearchDebounce in apps/web/src/lib/api.ts to match the expected import name after the hook was renamed in packages/utils
  • DOM environment: Configured happy-dom environment in root bunfig.toml so UI component tests have access to document
  • Button accessibility: Forward aria-label prop through the Button component so icon-only buttons have an accessible name
  • Date format: Changed format string from dd/MM/yyyy to d/MM/yyyy (non-zero-padded day) in the date formatter
  • Stale closure: Used functional state update (prev => ...) in DataTable sort handler to avoid capturing stale state
  • TypeScript: Added bun-types to tsconfig types array for proper bun:test module resolution

Verification

All 13 tests pass and tsc --noEmit reports 0 errors.

Assumptions

  • The bun:test type errors were unintentional (bun-types was already installed but not referenced in tsconfig)
  • The date format should use non-padded day (d/MM/yyyy) based on test expectations
  • The useSearchDebounce export is a compatibility alias for the renamed useDebounce hook

- Fix renamed hook: re-export useDebounce as useSearchDebounce in api.ts
- Fix DOM environment: configure happy-dom in root bunfig.toml for UI tests
- Fix Button accessibility: forward aria-label prop in Button component
- Fix date format: use d/MM/yyyy (non-padded day) in date formatter
- Fix stale closure: use functional state update in DataTable sort handler
- Add bun-types to tsconfig for proper bun:test type resolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant